﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpDbCommonEdit.h"
#include "IObject.h"

namespace gcmp
{
    class IElement;
    class ICurve3d;

    /// \brief 对象的修剪组件的接口。
    class GCMP_DB_COMMON_EDIT_EXPORT IElementTrimStrategy : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::IElementTrimStrategy, gcmp::IObject);

    public:
        /// \brief 对象的是否可修剪。
        /// \param explanation 不可修剪时，可以返回原因。
        /// \return 可修剪则返回true；否则返回false。
        virtual bool CanBeTrimmed(const IElement* pElement, std::wstring* explanation) const = 0;

    public:
        ~IElementTrimStrategy();
    };
}
